home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 19 / madtrb40.zip / ZCOLOR.210 < prev   
Text File  |  1985-09-08  |  5KB  |  107 lines

  1. {**********************************************************************}
  2. {*         Z a p  C o l o r s  :  Modify Compiler Menu/Edit Colors    *}
  3. {*                                                                    *}
  4. {*          Separate this file into ZCOLOR.210                        *}
  5. {**********************************************************************}
  6. Procedure Zap_Colors;                  { Reverse Compiler Intensity    }
  7.    Var
  8.       Zap_Address :integer;
  9.       Chval,
  10.       Char_Hi,Char_Lo,Char_Marked,Char_Err :byte;
  11. {------------------------------------------------------------------------}
  12. {        Find_Colors : Find old colors and postion to Output File        }
  13. {------------------------------------------------------------------------}
  14.     Procedure Find_Colors;
  15.  
  16.        Begin
  17.        Zap_type := Zap_Edit_Colors;
  18.                                           { Find original Colors positn}
  19.        Find_Zap(Zap_Headers[zap_type],Return_Code);
  20.  
  21.        If ( Return_Code = 0 ) then                 { Get Zap address      }
  22.          Begin {Find Zap}                          { for reference only   }
  23.          Read(Zap_File,Zap_Address);
  24.          Seek(ComOut_File,Zap_Address-$100);         { Seek to Zap Address  }
  25.                                                      { Current Attributes   }
  26.          Read(ComOut_File,Char_Hi,Char_Lo,Char_Marked,Char_Err);
  27.  
  28.          Repeat {unitl Chval = 13}                   { Get Hilite Colors    }
  29.             Textcolor(Char_Hi and $0F);TextBackground(Char_Hi shr 4);
  30.             ClrScr;Write(' Enter Editor ');
  31.                    Textcolor(Char_Hi and $0F +Blink);
  32.                    Write('Hilite ');
  33.                    Textcolor(Char_Hi and $0F);
  34.                    Write('Attributes:');Writeln;
  35.             Select_color(Char_Hi);                     { Get New Colors     }
  36.             Textcolor(Char_Hi and $0F);TextBackground(Char_Hi shr 4);
  37.             ClrScr;Writeln(' Return if acceptable or hit any key...');
  38.             Chval := Keyin;
  39.          Until (Chval = 13);
  40.  
  41.          Repeat {unitl Chval = 13}                  { Get Normal color attrib}
  42.             Textcolor(Char_Lo and $0F);TextBackground(Char_Lo shr 4);
  43.             ClrScr;Write(' Enter Editor ');
  44.             Textcolor(Char_Lo and $0F+Blink); Write('Normal Text ');
  45.             Textcolor(Char_Lo and $0F); Writeln('Attributes:');
  46.             Select_color(Char_Lo);                   { Get New Colors       }
  47.             Textcolor(Char_Lo and $0F);TextBackground(Char_Lo shr 4);
  48.             ClrScr;Writeln(' Return if acceptable or hit any key...');
  49.             Chval := Keyin;
  50.          Until (Chval = 13);
  51.  
  52.          Repeat {unitl Chval = 13}                  { Get Error Attributes   }
  53.             Textcolor(Char_Marked and $0F);TextBackground(Char_Marked shr 4);
  54.             ClrScr;Write(' Enter Editor ');
  55.             Textcolor(Char_Marked and $0F+Blink);Write('Marked Text ');
  56.             Textcolor(Char_Marked and $0F);Writeln('Attributes:');
  57.             Select_color(Char_Marked);               { Get New Colors       }
  58.             Textcolor(Char_Marked and $0F);TextBackground(Char_Marked shr 4);
  59.             ClrScr;Writeln(' Return if acceptable or hit any key...');
  60.             Chval := Keyin;
  61.          Until (Chval = 13);
  62.  
  63.          Repeat {unitl Chval = 13}                  { Get Error Attributes   }
  64.             Textcolor(Char_Err and $0F);TextBackground(Char_Err shr 4);
  65.             ClrScr;Write(' Enter ');
  66.             Textcolor(Char_Err and $0F+Blink);Write('Error Message Text ');
  67.             Textcolor(Char_Err and $0F);Writeln('Attributes:');
  68.             Select_color(Char_Err);                  { Get New Colors       }
  69.             Textcolor(Char_Err and $0F);TextBackground(Char_Err shr 4);
  70.             ClrScr;Writeln(' Return if acceptable or hit any key...');
  71.             Chval := Keyin;
  72.          Until (Chval = 13);
  73.  
  74.          Seek(ComOut_File,Zap_Address-$100);         { Seek to Zap Address  }
  75.          Return_Code := IOresult;                    { Write New Attributes }
  76.          Write(ComOut_File,Char_Hi,Char_Lo,Char_Marked,Char_Err);
  77.  
  78.         End; {Find_Zap Return_Code = 0}
  79.     End;{Procedure Find_Colors}
  80. {-----------------------------------------------------------------------}
  81. {   M A I N  Z a p _ C o l o r s  P r o c e d u r e                     }
  82. {-----------------------------------------------------------------------}
  83.  
  84.    Begin { Procedure Zap_Colors}
  85.    Get_Abs_Cursor(x,y);                  { Get current cursor position }
  86.    MkWin(x,y,x+48,y+7,White);            { Make an input window        }
  87.    Textcolor(Bright+Blue); TextBackground(Black); Clrscr;
  88.  
  89.    Open_Compiler;                        { Open Compiler/Get Version   }
  90.    If (Return_Code = 0) then Find_Colors;
  91.  
  92.    If (Return_Code <> 0) then
  93.         Begin                         { Write Error msg and pause   }
  94.         Pause(' Error Processing Edit Color Zap ');
  95.         end;
  96.    If (Return_Code = 0) then
  97.         Begin
  98.         Pause(' Compiler Color Zaps Completed ');
  99.         end;
  100.  
  101.    Close(Zap_File);
  102.    Close(ComOut_File);
  103.    RmWin;
  104.  
  105.  End; { Procedure Zap_Colors }
  106. {......................................................................}
  107.